feat: multi-provider cli setup wizard and self-hosted iroh relay - #1070
Conversation
Semgrep Security ScanNo security issues found. |
PR Metrics
Updated Wed, 15 Jul 2026 19:36:57 GMT · run #2311 |
1fb16db to
05e6c6c
Compare
|
Preview environment destroyed 🧹 Stack |
There was a problem hiding this comment.
🔭 thunder-deep-review (advisory)
Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: 05e6c6c83314 · mode: deep · deferred 0 item(s) already reported by other bots (best-effort dedup)
There was a problem hiding this comment.
🔭 thunder-deep-review (advisory)
Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: f8aa49b9d2cd · mode: deep · deferred 0 item(s) already reported by other bots (best-effort dedup)
There was a problem hiding this comment.
🔭 thunder-deep-review (advisory)
Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: 445e48407905 · mode: deep · deferred 0 item(s) already reported by other bots (best-effort dedup)
There was a problem hiding this comment.
🔭 thunder-deep-review (advisory)
Complements the other bots — surfaces only what they did not flag. Never approves, never requests changes, never gates merge.
head: d993285ff271 · mode: deep · deferred 0 item(s) already reported by other bots (best-effort dedup)
Removes the CLI's hard Anthropic dependency and stands up the self-hosted iroh relay path. Originally stacked on #1032; now rebased onto
mainafter that PR's squash-merge.What
Multi-provider model resolution (
cli/src/agent/)--providernow accepts 14 builtin vendors resolved against the Pi catalog (anthropic, openai, google, xai, deepseek, zai, mistral, groq, openrouter, moonshotai, minimax, cerebras, together, fireworks) plus the existingopenai-compatescape hatch.--api-keyis threaded per-call and wins over env; each builtin provider keeps Pi's native env resolution (OPENAI_API_KEY,GEMINI_API_KEY, …).First-run setup wizard (
cli/src/config/)thunderboltwith no credentials in a TTY now launches a 3-step wizard (17-choice vendor menu incl. Ollama/LM Studio presets and custom OpenAI-compatible endpoints → hidden API-key input → model pick) instead of erroring.$THUNDERBOLT_HOME/config.json(mode 0600). Precedence: flag > env > config > default. Saved key/baseUrl are provider-scoped — a saved Anthropic key is never forwarded when--provideroverrides to another vendor.thunderbolt configsubcommand re-runs the wizard. Non-TTY keeps a crisp guidance error.Self-hosted iroh relay — groundwork + docs only (
deploy/iroh-relay/,docs/architecture/)docker compose up -drunsn0computer/iroh-relay:v1.0.2 --devon :3340; both sides already accept overrides (THUNDERBOLT_IROH_RELAY_URLruntime CLI /VITE_IROH_RELAY_URLbuild-time app).config.example.toml): LetsEncrypt, QUIC address discovery (UDP 4433), shared-token access control, rate limits.deploy/docker/iroh-relay.Dockerfile,deploy/config/iroh-relay.toml, and theimages-publish.ymlGHCR step. The architecture doc's "Production deployment" section documents that Render/GHCR pattern ahead of the artifacts by design; committing the three closes the reference.Rebase notes (post-#1032 squash)
iroh/paths.ts'sthunderboltHomeDir()(from the ACP-sessions fix) and this branch'sbaseDir()were the same concept — now a single injectablethunderboltHomeDir()incli/src/paths.ts, consumed by iroh state, ACP sessions, and the new config store.acp serve(workspaceRootharness branch, bash dropped) — the jail path is preserved untouched; multi-provider resolution applies to both jailed and unjailed harnesses.VERSIONfrompackage.jsonand the refreshed README (curl installer from feat(cli): add a curl-to-shell remote installer #1080,thunderbolt-cli-<target>binaries from build(cli): name release binaries thunderbolt-cli-<target> #1081) kept, with the multi-provider/wizard/config docs merged on top.Validation
cli: tsc clean, 289 tests × 5 runs = 1445 pass / 0 fail post-rebase; rootmake checkgreen (lint, prettier, license headers).http://localhost:3340/, zero n0 relay involvement).Follow-ups (not in this PR — tracked in Linear, project Zeus CLI)
iroh.thunderbolt.io), incl. committing the production artifacts named above.shared_tokenvia Authorization Bearer).